title Apply mappings

actor User as U
participant Frontend as F
participant Backend as B
participant Database as D

U->F: enter context
F->U: OK
U->F: enter local spec
F->U: OK
U->F: apply mappings
F->B: apply mappings
B->D: fetch from context
D->B: OK
opt
B->B: ensure inferences
B->D: persist inferences
end
B->B: validate mappings
B->D: update spec
D->B: OK
B->F: OK
F->U: OK